#
#
#
#

require 'phplus/image'
require 'phplus/span'

module Ph
  
  class Tool < Ph::Container
    
    def initialize(caption='')
      super()
      @body.add( { :icon => Ph::Image.new, :caption => Ph::Span.new  } ) 
      
      @body[:caption].body.add(caption)
    end
  end
end

def ph_tool(caption='', properties=nil)
  result = Ph::Tool.new(caption)
  result.properties.set(properties) if properties
  
  return result
end